package test05.demo3;

public class TwoThread extends Thread {

    public static final Object TWO_Lock = new Object();

    @Override
    public void run() {
        synchronized (TWO_Lock) {
            System.out.printf("获取第二把锁 %s，执行相关的业务代码！%n", "TWO_Lock");

            synchronized (OneThread.ONE_Lock) {
                System.out.printf("获取第一把锁 %s，执行相关的业务代码！%n", "ONE_Lock");
            }
        }
    }
}
